package com.dstz.bpm.plugin.global.script.def;

import com.dstz.bpm.api.constant.EventType;
import com.dstz.bpm.engine.plugin.plugindef.AbstractBpmExecutionPluginDef;
import java.util.HashMap;
import java.util.Map;
import org.hibernate.validator.constraints.NotEmpty;

public class NodeScriptPluginDef extends AbstractBpmExecutionPluginDef {
   @NotEmpty(
      message = "事件脚本节点ID不能为空"
   )
   private String nodeId = "";
   private Map<EventType, String> p = new HashMap();

   public String a(EventType event) {
      return (String)this.p.get(event);
   }

   public void a(EventType event, String scritp) {
      this.p.put(event, scritp);
   }

   public Map<EventType, String> getScript() {
      return this.p;
   }

   public void setScript(Map<EventType, String> script) {
      this.p = script;
   }

   public String getNodeId() {
      return this.nodeId;
   }

   public void setNodeId(String nodeId) {
      this.nodeId = nodeId;
   }
}
